package com.eshipenet.shipnet.equipmentdatahub
import org.joda.time.DateTime
import play.api.libs.json.{JsValue, Json}

case class EquipmentData(equipment: Equipment,
                         model: EquipmentModel,
                         data: Map[String, EdgeChannelData],
                         timestampNS: Long) {

  def toJson: JsValue = Json.obj(
    "equipment" -> equipment.raw,
    "model"     -> model.raw,
    "data"      -> data.mapValues(_.toJson),
    "timestamp" -> timestampNS,
  )
}
